package com.tjetc.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * 用户信息表
 */
@Document(indexName = "user")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    @Id
    @Field(type = FieldType.Integer,store = true, index = true)
    private Integer id;
    @Field(type = FieldType.Text,store = true, index = true)
    private String username;
    @Field(type = FieldType.Text,store = true, index = true)
    private String phone;
    @Field(type = FieldType.Text,store = true, index = true)
    private String password;
    @Field(type = FieldType.Date,store = true, index = true)
    private Date registerTime;
    @Field(type = FieldType.Text,store = true, index = true)
    private String avatar;
    @Field(type = FieldType.Text,store = true, index = true)
    private String background;
    @Field(type = FieldType.Text,store = true, index = true)
    private String gender;
    @Field(type = FieldType.Date,store = true, index = true)
    private Date birthDate;
    @Field(type = FieldType.Text,store = true, index = true)
    private String city;


}